Skip to content

[FEAT]: 테이블 이미지 조회 응답을 id, url로 묶어서 내려주도록 main에 반영#147

Merged
twodo0 merged 300 commits intomainfrom
develop
Feb 19, 2026
Merged

[FEAT]: 테이블 이미지 조회 응답을 id, url로 묶어서 내려주도록 main에 반영#147
twodo0 merged 300 commits intomainfrom
develop

Conversation

@twodo0
Copy link
Contributor

@twodo0 twodo0 commented Feb 19, 2026

💡 작업 개요

  • 테이블 이미지 조회 응답을 id, url로 묶어서 내려주도록 수정

✅ 작업 내용

  • 기능 개발
  • 버그 수정
  • 리팩토링
  • 주석/포맷 정리
  • 기타 설정

🧪 테스트 내용

  • 로컬 정상 빌드 확인 완료

📝 기타 참고 사항

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 음식점 검색 결과에 지리적 좌표(위도, 경도) 정보가 추가되었습니다.
  • 개선 사항

    • 테이블 이미지 데이터 구조가 개선되어 각 이미지에 고유 식별자가 포함되도록 업데이트되었습니다.

twodo0 and others added 30 commits January 8, 2026 16:38
[FEAT]: 식당(Store) 도메인 엔티티 설계
[FEAT]: HTTPS 적용 및 NGINX Blue-Green 무중단 배포 전환 로직 수정
@twodo0 twodo0 self-assigned this Feb 19, 2026
@twodo0 twodo0 added the feature label Feb 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

워크스루

이 PR은 Store와 TableImage 도메인의 DTO 및 변환기를 수정하여 지리적 좌표(위도/경도)를 StoreSearchDto에 추가하고, TableImage 응답을 단순 URL 문자열에서 ID와 URL을 포함한 구조화된 객체로 변경합니다.

변경사항

Cohort / File(s) 요약
Store 지리적 좌표 추가
src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java, src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java
StoreSearchDto에 위도 및 경도 필드를 추가하고, 변환기에서 이 필드들을 store 엔티티로부터 채웁니다. 사용하지 않는 MultipartFile import도 제거됩니다.
TableImage DTO 구조 개선
src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java, src/main/java/com/eatsfine/eatsfine/domain/tableimage/converter/TableImageConverter.java
GetTableImageDto의 필드 타입을 List<String>에서 새로운 TableImageItem 레코드를 포함한 List<TableImageResDto.TableImageItem>로 변경하고, 빌더 호출을 업데이트합니다.
TableImage 서비스 데이터 변환
src/main/java/com/eatsfine/eatsfine/domain/tableimage/service/TableImageQueryServiceImpl.java
리포지토리에서 TableImageItem DTO 객체 목록을 빌더를 통해 생성하도록 변경하여, 단순 URL 문자열 대신 이미지 ID와 URL을 함께 전달합니다.

코드 리뷰 예상 소요시간

🎯 3 (Moderate) | ⏱️ ~20분

관련 PR

추천 리뷰어

  • CokaNuri
  • sonjunkyu
  • zerochani
  • SungMinju

축하 시

🐰 좌표와 이미지가 춤을 춘다네,
DTO에 담긴 새로운 구조,
더 자세한 정보로 사용자 미소 짓게 하는,
그 작은 변화가 모여 큰 개선이 되니,
한 발 한 발 나아가는 우리의 여정! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 핵심 내용(테이블 이미지 조회 응답을 id, url로 묶어서 반환)을 명확하게 반영하고 있습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 작업 개요와 테스트 내용이 포함되어 있습니다. 다만 작업 항목 체크박스가 모두 미선택 상태입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java (2)

62-62: ⚠️ Potential issue | 🟡 Minor

reviewCount 타입 불일치 — StoreSearchDtoInteger, StoreDetailDtoLong

동일한 의미의 reviewCount 필드가 StoreSearchDto에서는 Integer, StoreDetailDto에서는 Long으로 선언되어 있습니다. 리뷰 수는 대규모 데이터 가능성이 있으므로 Long으로 통일하거나, 의도적 차이라면 주석으로 명시해 주세요.

♻️ 수정 제안 (Long으로 통일)
-        Integer reviewCount, // 리뷰 도메인이 존재하지 않아 null 허용
+        Long reviewCount, // 리뷰 도메인이 존재하지 않아 null 허용
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` at
line 62, The review points out inconsistent types for the same semantic field
reviewCount across DTOs; update the declaration for reviewCount in
StoreSearchDto (and any related mapping/constructor usages) to use Long to match
StoreDetailDto (or vice versa if you prefer smaller type), and ensure all
references, builders, and conversion methods that set or get reviewCount (e.g.,
in StoreSearchDto, StoreDetailDto, and StoreResDto) are updated accordingly and
compile; if the difference was intentional, add a clarifying comment on the DTO
field explaining the reason.

65-65: ⚠️ Potential issue | 🟠 Major

StoreDetailDto.tableImageUrls를 id+url 구조로 변경하거나 설계 의도 명시 필요

PR 목표("테이블 이미지 조회 응답을 id, url로 묶어서 반환")와 달리, StoreDetailDtotableImageUrls는 여전히 List<String>으로 유지되고 있습니다. 반면 TableImageResDto.GetTableImageDto에서는 List<TableImageItem>(id+url 구조)으로 일관성 있게 적용되었습니다.

두 조회 응답의 구조를 통일하려면:

  • StoreDetailDtotableImageUrlsList<TableImageItem>으로 변경하거나
  • 별도 엔드포인트에만 id+url 구조를 적용한다는 설계 의도를 주석으로 명시해야 합니다.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` at
line 65, The StoreDetailDto field tableImageUrls in StoreResDto is still a
List<String> but should match the id+url structure used by
TableImageResDto.GetTableImageDto (List<TableImageItem>) per the PR goal; change
the type of tableImageUrls to List<TableImageItem> in
StoreResDto/StoreDetailDto, update constructors/factory/mapping logic that
populates it (e.g., any toDto/fromEntity methods), add the necessary import for
TableImageItem, and adjust JSON/serialization names if needed; alternatively, if
the intent is to keep List<String> only for this DTO, add a clear comment on
StoreResDto/StoreDetailDto explaining that only the table image endpoint returns
id+url and why the simpler List<String> is kept here.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java`:
- Line 29: toSearchDto currently maps store.getMainImageKey() directly into
mainImageUrl causing inconsistency with other converters; update either the call
site in StoreQueryServiceImpl to pass s3Service.toUrl(store.getMainImageKey())
into StoreConverter.toSearchDto, or change StoreConverter.toSearchDto signature
to accept an extra String mainImageUrl parameter (e.g., toSearchDto(Store store,
Double distance, String mainImageUrl, boolean isOpenNow)) and use that value for
mainImageUrl, ensuring all callers are updated to supply the pre-converted URL
from s3Service.toUrl.

In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java`:
- Around line 31-32: StoreSearchDto currently declares latitude and longitude as
primitive double which can NPE during auto-unboxing in
StoreConverter.toSearchDto when calling store.getLatitude()/store.getLongitude()
(which return nullable Double); change the StoreSearchDto record's latitude and
longitude types from double to Double if location is optional, or alternatively
keep primitives but add null-safe handling in StoreConverter.toSearchDto (e.g.,
provide default values or conditional mapping) to avoid unboxing nulls — update
references in StoreConverter.toSearchDto and any callers accordingly.

In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`:
- Around line 9-13: UploadTableImageDto currently uses List<String>
tableImageUrls while GetTableImageDto uses List<TableImageItem>, causing
inconsistent API shapes; change UploadTableImageDto to use List<TableImageItem>
(or a dedicated UploadTableImageItem if you need different fields) by updating
the record declaration UploadTableImageDto(Long storeId, List<TableImageItem>
tableImageItems), adjust the `@Builder` usage and any constructors/build sites,
and update all usages/serializers/deserializers to accept the TableImageItem
structure so clients can track IDs consistently after upload.
- Around line 15-25: Move the nested record declaration TableImageItem so it
appears before GetTableImageDto; specifically reorder the two record
declarations so TableImageItem is declared first, then GetTableImageDto (which
references TableImageItem), to improve readability while keeping existing
builders and field names unchanged.

---

Outside diff comments:
In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java`:
- Line 62: The review points out inconsistent types for the same semantic field
reviewCount across DTOs; update the declaration for reviewCount in
StoreSearchDto (and any related mapping/constructor usages) to use Long to match
StoreDetailDto (or vice versa if you prefer smaller type), and ensure all
references, builders, and conversion methods that set or get reviewCount (e.g.,
in StoreSearchDto, StoreDetailDto, and StoreResDto) are updated accordingly and
compile; if the difference was intentional, add a clarifying comment on the DTO
field explaining the reason.
- Line 65: The StoreDetailDto field tableImageUrls in StoreResDto is still a
List<String> but should match the id+url structure used by
TableImageResDto.GetTableImageDto (List<TableImageItem>) per the PR goal; change
the type of tableImageUrls to List<TableImageItem> in
StoreResDto/StoreDetailDto, update constructors/factory/mapping logic that
populates it (e.g., any toDto/fromEntity methods), add the necessary import for
TableImageItem, and adjust JSON/serialization names if needed; alternatively, if
the intent is to keep List<String> only for this DTO, add a clear comment on
StoreResDto/StoreDetailDto explaining that only the table image endpoint returns
id+url and why the simpler List<String> is kept here.

.distance(distance)
.latitude(store.getLatitude())
.longitude(store.getLongitude())
.mainImageUrl(store.getMainImageKey())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# 1. StoreConverter.java 파일의 전체 내용 확인 (크기 확인)
wc -l src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java

Repository: Eatsfine/BE

Length of output: 137


🏁 Script executed:

# 2. StoreConverter.java의 toSearchDto 메소드 주변 코드 확인
sed -n '1,50p' src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java

Repository: Eatsfine/BE

Length of output: 2649


🏁 Script executed:

# 3. mainImageKey, mainImageUrl 관련 사용 패턴 확인
rg "mainImageKey|mainImageUrl" --type java -C 3

Repository: Eatsfine/BE

Length of output: 15923


🏁 Script executed:

# 4. S3 URL 변환 관련 로직 검색
rg "presigned|CDN|getUrl|toUrl|imageUrl" --type java -C 2

Repository: Eatsfine/BE

Length of output: 18123


🏁 Script executed:

# Verify where toSearchDto is called from
rg "toSearchDto" --type java -B 3 -A 3

Repository: Eatsfine/BE

Length of output: 1859


toSearchDto 메소드에서 S3 키를 URL로 변환하지 않고 직접 매핑 — 아키텍처 패턴 불일치

toSearchDtostore.getMainImageKey()를 그대로 mainImageUrl 필드에 매핑하고 있습니다. 반면 toDetailDto, toMyStoreDto 등 다른 변환 메소드들은 서비스 레이어에서 s3Service.toUrl()로 변환된 값을 받아 사용합니다.

현재 StoreQueryServiceImpl에서 toSearchDto 호출 시:

.map(row -> StoreConverter.toSearchDto(
    row.store(),
    row.distance(),
    isOpenNow(row.store(), now)))

mainImageUrl 필드명은 URL을 기대하므로, 다른 메소드들과 동일하게 서비스 레이어에서 먼저 s3Service.toUrl(store.getMainImageKey())로 변환한 후 전달하거나, 메소드 시그니처를 (Store store, Double distance, String mainImageUrl, boolean isOpenNow)로 수정하여 일관성을 유지해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/eatsfine/eatsfine/domain/store/converter/StoreConverter.java`
at line 29, toSearchDto currently maps store.getMainImageKey() directly into
mainImageUrl causing inconsistency with other converters; update either the call
site in StoreQueryServiceImpl to pass s3Service.toUrl(store.getMainImageKey())
into StoreConverter.toSearchDto, or change StoreConverter.toSearchDto signature
to accept an extra String mainImageUrl parameter (e.g., toSearchDto(Store store,
Double distance, String mainImageUrl, boolean isOpenNow)) and use that value for
mainImageUrl, ensuring all callers are updated to supply the pre-converted URL
from s3Service.toUrl.

Comment on lines +31 to +32
double latitude,
double longitude,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

프리미티브 double로 선언된 latitude/longitude — null 역참조 위험

StoreSearchDto record의 latitude, longitudedouble 프리미티브로 선언되어 있습니다. StoreConverter.toSearchDto에서 store.getLatitude() / store.getLongitude()Double (nullable)을 반환하면 auto-unboxing 시 NPE가 발생합니다. 위치 정보가 필수 값이 아닌 경우 Double로 변경하거나, 컨버터에서 null-safe 처리를 추가해야 합니다.

🛡️ 수정 제안 (nullable 허용 시)
-        double latitude,
-        double longitude,
+        Double latitude,
+        Double longitude,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
double latitude,
double longitude,
Double latitude,
Double longitude,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/com/eatsfine/eatsfine/domain/store/dto/StoreResDto.java` around
lines 31 - 32, StoreSearchDto currently declares latitude and longitude as
primitive double which can NPE during auto-unboxing in
StoreConverter.toSearchDto when calling store.getLatitude()/store.getLongitude()
(which return nullable Double); change the StoreSearchDto record's latitude and
longitude types from double to Double if location is optional, or alternatively
keep primitives but add null-safe handling in StoreConverter.toSearchDto (e.g.,
provide default values or conditional mapping) to avoid unboxing nulls — update
references in StoreConverter.toSearchDto and any callers accordingly.

Comment on lines +9 to +13
@Builder
public record UploadTableImageDto(
Long storeId,
List<String> tableImageUrls) {
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

UploadTableImageDto가 여전히 List<String>을 사용하는 설계 일관성 확인 필요

GetTableImageDtoList<TableImageItem>으로 변경되었지만, UploadTableImageDto는 여전히 List<String> tableImageUrls로 날(raw) URL 문자열을 사용합니다. 업로드 응답에 ID가 필요하지 않다면 의도적인 설계 차이일 수 있으나, 이미지 업로드 후 클라이언트가 ID를 추적해야 하는 경우라면 동일한 TableImageItem 구조를 사용하는 것이 좋습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`
around lines 9 - 13, UploadTableImageDto currently uses List<String>
tableImageUrls while GetTableImageDto uses List<TableImageItem>, causing
inconsistent API shapes; change UploadTableImageDto to use List<TableImageItem>
(or a dedicated UploadTableImageItem if you need different fields) by updating
the record declaration UploadTableImageDto(Long storeId, List<TableImageItem>
tableImageItems), adjust the `@Builder` usage and any constructors/build sites,
and update all usages/serializers/deserializers to accept the TableImageItem
structure so clients can track IDs consistently after upload.

Comment on lines +15 to +25
@Builder
public record GetTableImageDto(
Long storeId,
List<TableImageItem> tableImages) {
}

@Builder
public record DeleteTableImageDto(
Long storeId,
List<Long> deletedTableImageIds
){}
@Builder
public record TableImageItem(
Long tableImageId,
String tableImageUrl) {
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

TableImageItem 선언 순서를 GetTableImageDto 위로 이동하는 것을 권장합니다.

GetTableImageDto(Line 16–19)가 TableImageItem을 참조하고 있는데, TableImageItem은 그 아래(Line 22–25)에 선언되어 있습니다. Java 컴파일러는 동일 클래스 내에서 선언 순서와 무관하게 타입을 해석하므로 컴파일 오류는 없지만, 참조되는 타입이 나중에 등장하면 코드 가독성이 저하됩니다.

♻️ 선언 순서 정렬 제안
+       `@Builder`
+       public record TableImageItem(
+                       Long tableImageId,
+                       String tableImageUrl) {
+       }
+
        `@Builder`
        public record GetTableImageDto(
                        Long storeId,
                        List<TableImageItem> tableImages) {
        }

-       `@Builder`
-       public record TableImageItem(
-                       Long tableImageId,
-                       String tableImageUrl) {
-       }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Builder
public record GetTableImageDto(
Long storeId,
List<TableImageItem> tableImages) {
}
@Builder
public record DeleteTableImageDto(
Long storeId,
List<Long> deletedTableImageIds
){}
@Builder
public record TableImageItem(
Long tableImageId,
String tableImageUrl) {
}
`@Builder`
public record TableImageItem(
Long tableImageId,
String tableImageUrl) {
}
`@Builder`
public record GetTableImageDto(
Long storeId,
List<TableImageItem> tableImages) {
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/eatsfine/eatsfine/domain/tableimage/dto/TableImageResDto.java`
around lines 15 - 25, Move the nested record declaration TableImageItem so it
appears before GetTableImageDto; specifically reorder the two record
declarations so TableImageItem is declared first, then GetTableImageDto (which
references TableImageItem), to improve readability while keeping existing
builders and field names unchanged.

@twodo0 twodo0 merged commit 3e0dc42 into main Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants